<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Stalin Protocol Benchmark: Benchmark Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Stalin Protocol Benchmark
   </div>
   <div id="projectbrief">A Democratic benchmark by the people, for the people.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_benchmark-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Benchmark Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides benchmark tests for UDP and TCP communications.  
 <a href="class_benchmark.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_benchmark_8h_source.html">Benchmark.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a136c0926fa65758b23a5e162eaa0e68b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#a136c0926fa65758b23a5e162eaa0e68b">Benchmark</a> (int argc, char **argv)</td></tr>
<tr class="memdesc:a136c0926fa65758b23a5e162eaa0e68b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> <a class="el" href="class_benchmark.html" title="Provides benchmark tests for UDP and TCP communications. ">Benchmark</a> default constructor.  <a href="#a136c0926fa65758b23a5e162eaa0e68b">More...</a><br/></td></tr>
<tr class="separator:a136c0926fa65758b23a5e162eaa0e68b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a824761ac867dc7f643b647924dba5cc4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#a824761ac867dc7f643b647924dba5cc4">Start</a> (void)</td></tr>
<tr class="memdesc:a824761ac867dc7f643b647924dba5cc4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Starts the benchmark.  <a href="#a824761ac867dc7f643b647924dba5cc4">More...</a><br/></td></tr>
<tr class="separator:a824761ac867dc7f643b647924dba5cc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13a1597b06c2cc084cdacdb5cbd5a6a4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#a13a1597b06c2cc084cdacdb5cbd5a6a4">Stop</a> (void)</td></tr>
<tr class="memdesc:a13a1597b06c2cc084cdacdb5cbd5a6a4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Stops the benchmark.  <a href="#a13a1597b06c2cc084cdacdb5cbd5a6a4">More...</a><br/></td></tr>
<tr class="separator:a13a1597b06c2cc084cdacdb5cbd5a6a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4e9d938830b807398f21078a15ef463"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#ab4e9d938830b807398f21078a15ef463">GetTimeElapsed</a> (void)</td></tr>
<tr class="memdesc:ab4e9d938830b807398f21078a15ef463"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Accessor method for the benchmark's elapses time.  <a href="#ab4e9d938830b807398f21078a15ef463">More...</a><br/></td></tr>
<tr class="separator:ab4e9d938830b807398f21078a15ef463"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a291165d2e0dee12a522ec56c8e1429b2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#a291165d2e0dee12a522ec56c8e1429b2">RunTest</a> (int _protocol, int _msgSize, int _numBlocks)</td></tr>
<tr class="memdesc:a291165d2e0dee12a522ec56c8e1429b2"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Begins a benchmark test.  <a href="#a291165d2e0dee12a522ec56c8e1429b2">More...</a><br/></td></tr>
<tr class="separator:a291165d2e0dee12a522ec56c8e1429b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb920711bc70e21a2d606853fa00db59"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#adb920711bc70e21a2d606853fa00db59">IsClient</a> (void)</td></tr>
<tr class="memdesc:adb920711bc70e21a2d606853fa00db59"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Determines if benchmark is acting as client or server.  <a href="#adb920711bc70e21a2d606853fa00db59">More...</a><br/></td></tr>
<tr class="separator:adb920711bc70e21a2d606853fa00db59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0cdce5ea0948552fa070f72001cf9fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structargs.html">args</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_benchmark.html#aa0cdce5ea0948552fa070f72001cf9fb">GetArgs</a> (void)</td></tr>
<tr class="memdesc:aa0cdce5ea0948552fa070f72001cf9fb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Brief Description:</b> Accessor for the benchmark arugments.  <a href="#aa0cdce5ea0948552fa070f72001cf9fb">More...</a><br/></td></tr>
<tr class="separator:aa0cdce5ea0948552fa070f72001cf9fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides benchmark tests for UDP and TCP communications. </p>
<p>Contains a series of tests for benchmark UDP and TCP communications against each other. The benchmarks are performed by timing how long a series of a data blocks take to be transmitted from one computer to the next. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a136c0926fa65758b23a5e162eaa0e68b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Benchmark::Benchmark </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> <a class="el" href="class_benchmark.html" title="Provides benchmark tests for UDP and TCP communications. ">Benchmark</a> default constructor. </p>
<p><b>Detailed Description:</b> Default constructor for the <a class="el" href="class_benchmark.html" title="Provides benchmark tests for UDP and TCP communications. ">Benchmark</a> class. It initializes the mStartTime, mStopTime, and mIsRunning flag to 0. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa0cdce5ea0948552fa070f72001cf9fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structargs.html">args</a> Benchmark::GetArgs </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Accessor for the benchmark arugments. </p>
<p><b>Detailed Description:</b> Accessor method for returning the benchmark arguments.</p>
<dl class="section return"><dt>Returns</dt><dd>mArguments <b> args </b> An args struct containing the arguments used in the benchmark. </dd></dl>

</div>
</div>
<a class="anchor" id="ab4e9d938830b807398f21078a15ef463"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Benchmark::GetTimeElapsed </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Accessor method for the benchmark's elapses time. </p>
<p><b>Detailed Description:</b> Determines and returns the elapsed time of the benchmark.</p>
<dl class="section return"><dt>Returns</dt><dd>timeElapsed <b> int </b> The time elapsed since the benchmark was started. </dd></dl>

</div>
</div>
<a class="anchor" id="adb920711bc70e21a2d606853fa00db59"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Benchmark::IsClient </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Determines if benchmark is acting as client or server. </p>
<p><b>Detailed Description:</b> This method determines if the benchmark is currently running as the server or as the client and returns the result.</p>
<dl class="section return"><dt>Returns</dt><dd>!isServer <b> bool </b> Whether or not the benchmark is acting as the client or server. </dd></dl>

</div>
</div>
<a class="anchor" id="a291165d2e0dee12a522ec56c8e1429b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Benchmark::RunTest </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>_protocol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>_msgSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>_numBlocks</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Begins a benchmark test. </p>
<p><b>Detailed Description:</b> Starts performing a benchmark test on the specified protocol with the specified message size and number of messages. This test is current flawed as it only tests the time to push the data the NIC and does not take into account the time it takes for the data to reach the computer.</p>
<p>[in] _protocol <b> int </b> Which protocol to use. TCP/IP or UDP [in] messageType <b> int </b> The size of the message to be sent. [in] _numBlocks <b> int </b> The number of times to send the message.</p>
<dl class="section return"><dt>Returns</dt><dd>timeElapsed <b> int </b> The time it took to push all the data to the NIC. </dd></dl>

</div>
</div>
<a class="anchor" id="a824761ac867dc7f643b647924dba5cc4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Benchmark::Start </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Starts the benchmark. </p>
<p><b>Detailed Description:</b> Stars the benchmark if it is not already running. </p>

</div>
</div>
<a class="anchor" id="a13a1597b06c2cc084cdacdb5cbd5a6a4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Benchmark::Stop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Brief Description:</b> Stops the benchmark. </p>
<p><b>Detailed Description:</b> Stops the benchmark if it is running. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>trunk/IADA1/inc/<a class="el" href="_benchmark_8h_source.html">Benchmark.h</a></li>
<li>trunk/IADA1/src/<a class="el" href="_benchmark_8cpp.html">Benchmark.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 28 2014 20:53:42 for Stalin Protocol Benchmark by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
